import os
import sys

from google.appengine.ext.appstats import recording

def set_path():
    c = os.path.abspath(os.path.dirname(__file__))
    add = [
        ['lib'],
    ]
    for item in add:
        p = os.path.join(c, *item)
        if not p in sys.path:
            sys.path[1:1] = [p]

set_path()

def webapp_add_wsgi_middleware(app):
    app = recording.appstats_wsgi_middleware(app)
    return app

dsbq_API_PROJECT_ID = None # required
dsbq_BUCKET_NAME    = None # required
